const mongoose = require('mongoose')
// 创建约束
const schema = new mongoose.Schema({
	name: {type: String},
	parent: {
		type: mongoose.Schema.Types.ObjectId,
		ref: 'Category'
	},
	editor:String
})
// 输出具备约束的model模型
module.exports = mongoose.model('Category', schema)
